The replace dialog box is similar in many ways to the find dialog, providing all the same options for finding text, with the addition of a field to determine the text to replace any matching results.
To replace a text string
Move the cursor to the point where you want to begin your search.
From the Edit menu, select Replace
In the Find What box, enter the search text or regular expression
In the Replace With box, enter the replacement text
Select the appropriate search options
Click Find Next, Replace or Replace All
The replace dialog box provides the additional option to replace the text specified within the confines of the current selection. This option is only available if a selection has been created in the editor.
To undo the effects of the last replacement, select Undo from the Edit menu. This will reverse the last change made. If you confirmed each replacement individually, you will need to undo each change separately.